package com.dev.main;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;

import com.arch.dev.server.bean.Catagory;
import com.arch.dev.server.dao.CatagoryDao;
import com.arch.dev.server.dao.impl.CatagoryDaoImpl;

public class SpringTest {
	public static void main(String[] args) {

		
		BeanFactory factory = new XmlBeanFactory(new FileSystemResource("C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/BudgetCalc/WEB-INF/applicationContext.xml"));
	 	CatagoryDao obj = (CatagoryDaoImpl)factory.getBean("CatagoryDaoImpl");
	 	
	
	 	Catagory c1 =  new Catagory("Medicine");
	 	
	 	
	 	obj.saveCatagory(c1);
	 	
	
	}
}
